import { Node } from 'cc';
import { ecs } from 'db://app-game/libs/ecs/ECS';

/** 锁定目标类型 */
export enum LockTargetType {
  /** 大本营 */
  HomeBase = 0,
  /** 怪兽 */
  Monster = 1,
}

/** 怪兽锁定攻击目标组件 */
@ecs.register('MonitorModelAttack')
export class MonitorModelAttackComp extends ecs.Comp {
  /** 锁定攻击目标 */
  lockTarget: Node;
  /** 锁定目标类型 */
  lockTargetType: LockTargetType = LockTargetType.HomeBase;
  /** 攻击范围 */
  attackRange: number = 0;
  reset(entity: ecs.Entity): void {
    this.lockTarget = null;
    this.lockTargetType = LockTargetType.HomeBase;
    this.attackRange = 0;
  }
}
